package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GardenMonthImageMapper;
import com.ruoyi.system.domain.GardenMonthImage;
import com.ruoyi.system.service.IGardenMonthImageService;

/**
 * 月份图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-02
 */
@Service
public class GardenMonthImageServiceImpl implements IGardenMonthImageService 
{
    @Autowired
    private GardenMonthImageMapper gardenMonthImageMapper;

    /**
     * 查询月份图片
     * 
     * @param id 月份图片主键
     * @return 月份图片
     */
    @Override
    public GardenMonthImage selectGardenMonthImageById(Long id)
    {
        return gardenMonthImageMapper.selectGardenMonthImageById(id);
    }

    /**
     * 查询月份图片列表
     * 
     * @param gardenMonthImage 月份图片
     * @return 月份图片
     */
    @Override
    public List<GardenMonthImage> selectGardenMonthImageList(GardenMonthImage gardenMonthImage)
    {
        return gardenMonthImageMapper.selectGardenMonthImageList(gardenMonthImage);
    }

    /**
     * 新增月份图片
     * 
     * @param gardenMonthImage 月份图片
     * @return 结果
     */
    @Override
    public int insertGardenMonthImage(GardenMonthImage gardenMonthImage)
    {
        gardenMonthImage.setCreateTime(DateUtils.getNowDate());
        return gardenMonthImageMapper.insertGardenMonthImage(gardenMonthImage);
    }

    /**
     * 修改月份图片
     * 
     * @param gardenMonthImage 月份图片
     * @return 结果
     */
    @Override
    public int updateGardenMonthImage(GardenMonthImage gardenMonthImage)
    {
        gardenMonthImage.setUpdateTime(DateUtils.getNowDate());
        return gardenMonthImageMapper.updateGardenMonthImage(gardenMonthImage);
    }

    /**
     * 批量删除月份图片
     * 
     * @param ids 需要删除的月份图片主键
     * @return 结果
     */
    @Override
    public int deleteGardenMonthImageByIds(Long[] ids)
    {
        return gardenMonthImageMapper.deleteGardenMonthImageByIds(ids);
    }

    /**
     * 删除月份图片信息
     * 
     * @param id 月份图片主键
     * @return 结果
     */
    @Override
    public int deleteGardenMonthImageById(Long id)
    {
        return gardenMonthImageMapper.deleteGardenMonthImageById(id);
    }
}
